﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using CSharp.Libs.WPF;

namespace CSharp.Libs.Koc.KocKernel.Models.ItemClasses
{
    public class ReportListItem : ViewModelBase
    {
        #region declarations
        private Int64 _intreportType = 0;
        private Int64 _intreportId = 0;
        private Int64 _intreportUnixTime = 0;
        private Int64 _intside0XCoord = 0;
        private Int64 _intside0YCoord = 0;
        private Int64 _intside0TileType = 0;
        private Int64 _intside0TileLevel = 0;
        private Int64 _intside0CityId = 0;
        private Int64 _intside0PlayerId = 0;
        private Int64 _intside0AllianceId = 0;
        private Int64 _intside1XCoord = 0;
        private Int64 _intside1YCoord = 0;
        private Int64 _intside1CityId = 0;
        private Int64 _intside1PlayerId = 0;
        private Int64 _intside1AllianceId = 0;
        private Int64 _intmarchType = 0;
        private Int64 _intmarchTypeState = 0;
        private Int64 _intuserId = 0;
        private Int64 _inteventType = 0;
        private Int64 _intsubType = 0;
        private Int64 _intreportStatus = 0;
        private Int64 _intreportDetailId = 0;
        private Int64 _ints0Kid = 0;
        private Int64 _ints1Kid = 0;
        private Int64 _ints1KLv = 0;
        private Int64 _ints0KCombatLv = 0;
        private Int64 _ints1KCombatLv = 0;
        private Int64 _intrnds = 0;
        private Int64 _intwinner = 0;
        private Int64 _intwall = 0;
        private Int64 _ints1atkBoost = 0;
        private Int64 _ints1defBoost = 0;
        private Boolean _fconquered = false;
        private Int64 _inttileLevel = 0;

        private String _strS0CityName = "";
        private String _strS1CityName = "";
        private String _strS0PlayerName = "";
        private String _strS1PlayerName = "";
        private String _strS0AllianceName = "";
        private String _strS1AllianceName = "";
        private String _strReportDateTime = "";
        private String _strMarchTypeName = "";
        #endregion



        #region constructor / terminator
        public ReportListItem()
        {
        }

        public ReportListItem(
            Kernel KRNL,
            Hashtable htReport)
        {
            reportType = KRNL.GetHashtableValue(htReport, constants.KEY_REPORT_TYPE, Kernel.VariableTypes.Int64);
            reportId = KRNL.GetHashtableValue(htReport, constants.KEY_REPORT_ID, Kernel.VariableTypes.Int64);
            reportUnixTime = KRNL.GetHashtableValue(htReport, constants.KEY_REPORT_UNIXTIME, Kernel.VariableTypes.Int64);
            side0XCoord=KRNL.GetHashtableValue(htReport, constants.KEY_SIDE0_XCOORD, Kernel.VariableTypes.Int64);
            side0YCoord = KRNL.GetHashtableValue(htReport, constants.KEY_SIDE0_YCOORD, Kernel.VariableTypes.Int64);
            side0TileType = KRNL.GetHashtableValue(htReport, constants.KEY_SIDE0_TILE_TYPE, Kernel.VariableTypes.Int64);
            side0TileLevel = KRNL.GetHashtableValue(htReport, constants.KEY_SIDE0_TILE_LEVEL, Kernel.VariableTypes.Int64);
            side0CityId = KRNL.GetHashtableValue(htReport, constants.KEY_SIDE0_CITY_ID, Kernel.VariableTypes.Int64);
            side0PlayerId = KRNL.GetHashtableValue(htReport, constants.KEY_SIDE0_PLAYER_ID, Kernel.VariableTypes.Int64);
            side0AllianceId = KRNL.GetHashtableValue(htReport, constants.KEY_SIDE0_ALLIANCE_ID, Kernel.VariableTypes.Int64);
            side1XCoord = KRNL.GetHashtableValue(htReport, constants.KEY_SIDE1_XCOORD, Kernel.VariableTypes.Int64);
            side1YCoord = KRNL.GetHashtableValue(htReport, constants.KEY_SIDE1_YCOORD, Kernel.VariableTypes.Int64);
            side1CityId = KRNL.GetHashtableValue(htReport, constants.KEY_SIDE1_CITY_ID, Kernel.VariableTypes.Int64);
            side1PlayerId = KRNL.GetHashtableValue(htReport, constants.KEY_SIDE1_PLAYER_ID, Kernel.VariableTypes.Int64);
            side1AllianceId = KRNL.GetHashtableValue(htReport, constants.KEY_SIDE1_ALLIANCE_ID, Kernel.VariableTypes.Int64);
            marchType = KRNL.GetHashtableValue(htReport, constants.KEY_MARCH_TYPE, Kernel.VariableTypes.Int64);
            marchTypeState = KRNL.GetHashtableValue(htReport, constants.KEY_MARCH_TYPE_STATE, Kernel.VariableTypes.Int64);
            userId = KRNL.GetHashtableValue(htReport, constants.KEY_USER_ID, Kernel.VariableTypes.Int64);
            eventType = KRNL.GetHashtableValue(htReport, constants.KEY_EVENT_TYPE, Kernel.VariableTypes.Int64);
            subType = KRNL.GetHashtableValue(htReport, constants.KEY_SUB_TYPE, Kernel.VariableTypes.Int64);
            reportStatus = KRNL.GetHashtableValue(htReport, constants.KEY_REPORT_STATUS, Kernel.VariableTypes.Int64);
            reportDetailId = KRNL.GetHashtableValue(htReport, constants.KEY_REPORT_DETAIL_ID, Kernel.VariableTypes.Int64);
            s0Kid = KRNL.GetHashtableValue(htReport, constants.KEY_S0_KID, Kernel.VariableTypes.Int64);
            s1Kid = KRNL.GetHashtableValue(htReport, constants.KEY_S1_KID, Kernel.VariableTypes.Int64);
            s1KLv = KRNL.GetHashtableValue(htReport, constants.KEY_S1_KLV, Kernel.VariableTypes.Int64);
            s0KCombatLv = KRNL.GetHashtableValue(htReport, constants.KEY_S0_KCOMBATLV, Kernel.VariableTypes.Int64);
            s1KCombatLv = KRNL.GetHashtableValue(htReport, constants.KEY_S1_KCOMBATLV, Kernel.VariableTypes.Int64);
            rnds = KRNL.GetHashtableValue(htReport, constants.KEY_RNDS, Kernel.VariableTypes.Int64);
            winner = KRNL.GetHashtableValue(htReport, constants.KEY_WINNER, Kernel.VariableTypes.Int64);
            wall = KRNL.GetHashtableValue(htReport, constants.KEY_WALL, Kernel.VariableTypes.Int64);
            s1atkBoost = KRNL.GetHashtableValue(htReport, constants.KEY_S1_ATK_BOOST, Kernel.VariableTypes.Int64);
            s1defBoost = KRNL.GetHashtableValue(htReport, constants.KEY_S1_DEF_BOOST, Kernel.VariableTypes.Int64);

            conquered = KRNL.GetHashtableValue(htReport, constants.KEY_CONQUERED, Kernel.VariableTypes.Boolean);

            tileLevel = KRNL.GetHashtableValue(htReport, constants.KEY_TILE_LEVEL, Kernel.VariableTypes.Int64);
        }
        #endregion



        #region private functions
        #endregion



        #region interface
        #region properties
        public Int64 reportType
        {
            get
            {
                return _intreportType;
            }
            set
            {
                _intreportType = value;
                OnPropertyChanged("reportType");
            }
        }

        public Int64 reportId
        {
            get
            {
                return _intreportId;
            }
            set
            {
                _intreportId = value;
                OnPropertyChanged("reportId");
            }
        }

        public Int64 reportUnixTime
        {
            get
            {
                return _intreportUnixTime;
            }
            set
            {
                _intreportUnixTime = value;
                OnPropertyChanged("reportUnixTime");
            }
        }

        public Int64 side0XCoord
        {
            get
            {
                return _intside0XCoord;
            }
            set
            {
                _intside0XCoord = value;
                OnPropertyChanged("side0XCoord");
            }
        }

        public Int64 side0YCoord
        {
            get
            {
                return _intside0YCoord;
            }
            set
            {
                _intside0YCoord = value;
                OnPropertyChanged("side0YCoord");
            }
        }

        public Int64 side0TileType
        {
            get
            {
                return _intside0TileType;
            }
            set
            {
                _intside0TileType = value;
                OnPropertyChanged("side0TileType");
            }
        }

        public Int64 side0TileLevel
        {
            get
            {
                return _intside0TileLevel;
            }
            set
            {
                _intside0TileLevel = value;
                OnPropertyChanged("side0TileLevel");
            }
        }

        public Int64 side0CityId
        {
            get
            {
                return _intside0CityId;
            }
            set
            {
                _intside0CityId = value;
                OnPropertyChanged("side0CityId");
            }
        }

        public Int64 side0PlayerId
        {
            get
            {
                return _intside0PlayerId;
            }
            set
            {
                _intside0PlayerId = value;
                OnPropertyChanged("side0PlayerId");
            }
        }

        public Int64 side0AllianceId
        {
            get
            {
                return _intside0AllianceId;
            }
            set
            {
                _intside0AllianceId = value;
                OnPropertyChanged("side0AllianceId");
            }
        }

        public Int64 side1XCoord
        {
            get
            {
                return _intside1XCoord;
            }
            set
            {
                _intside1XCoord = value;
                OnPropertyChanged("side1XCoord");
            }
        }

        public Int64 side1YCoord
        {
            get
            {
                return _intside1YCoord;
            }
            set
            {
                _intside1YCoord = value;
                OnPropertyChanged("side1YCoord");
            }
        }

        public Int64 side1CityId
        {
            get
            {
                return _intside1CityId;
            }
            set
            {
                _intside1CityId = value;
                OnPropertyChanged("side1CityId");
            }
        }

        public Int64 side1PlayerId
        {
            get
            {
                return _intside1PlayerId;
            }
            set
            {
                _intside1PlayerId = value;
                OnPropertyChanged("side1PlayerId");
            }
        }

        public Int64 side1AllianceId
        {
            get
            {
                return _intside1AllianceId;
            }
            set
            {
                _intside1AllianceId = value;
                OnPropertyChanged("side1AllianceId");
            }
        }

        public Int64 marchType
        {
            get
            {
                return _intmarchType;
            }
            set
            {
                _intmarchType = value;
                OnPropertyChanged("marchType");
            }
        }

        public Int64 marchTypeState
        {
            get
            {
                return _intmarchTypeState;
            }
            set
            {
                _intmarchTypeState = value;
                OnPropertyChanged("marchTypeState");
            }
        }

        public Int64 userId
        {
            get
            {
                return _intuserId;
            }
            set
            {
                _intuserId = value;
                OnPropertyChanged("userId");
            }
        }

        public Int64 eventType
        {
            get
            {
                return _inteventType;
            }
            set
            {
                _inteventType = value;
                OnPropertyChanged("eventType");
            }
        }

        public Int64 subType
        {
            get
            {
                return _intsubType;
            }
            set
            {
                _intsubType = value;
                OnPropertyChanged("subType");
            }
        }

        public Int64 reportStatus
        {
            get
            {
                return _intreportStatus;
            }
            set
            {
                _intreportStatus = value;
                OnPropertyChanged("reportStatus");
            }
        }

        public Int64 reportDetailId
        {
            get
            {
                return _intreportDetailId;
            }
            set
            {
                _intreportDetailId = value;
                OnPropertyChanged("reportDetailId");
            }
        }

        public Int64 s0Kid
        {
            get
            {
                return _ints0Kid;
            }
            set
            {
                _ints0Kid = value;
                OnPropertyChanged("s0Kid");
            }
        }

        public Int64 s1Kid
        {
            get
            {
                return _ints1Kid;
            }
            set
            {
                _ints1Kid = value;
                OnPropertyChanged("s1Kid");
            }
        }

        public Int64 s1KLv
        {
            get
            {
                return _ints1KLv;
            }
            set
            {
                _ints1KLv = value;
                OnPropertyChanged("s1KLv");
            }
        }

        public Int64 s0KCombatLv
        {
            get
            {
                return _ints0KCombatLv;
            }
            set
            {
                _ints0KCombatLv = value;
                OnPropertyChanged("s0KCombatLv");
            }
        }

        public Int64 s1KCombatLv
        {
            get
            {
                return _ints1KCombatLv;
            }
            set
            {
                _ints1KCombatLv = value;
                OnPropertyChanged("s1KCombatLv");
            }
        }

        public Int64 rnds
        {
            get
            {
                return _intrnds;
            }
            set
            {
                _intrnds = value;
                OnPropertyChanged("rnds");
            }
        }

        public Int64 winner
        {
            get
            {
                return _intwinner;
            }
            set
            {
                _intwinner = value;
                OnPropertyChanged("winner");
            }
        }

        public Int64 wall
        {
            get
            {
                return _intwall;
            }
            set
            {
                _intwall = value;
                OnPropertyChanged("wall");
            }
        }

        public Int64 s1atkBoost
        {
            get
            {
                return _ints1atkBoost;
            }
            set
            {
                _ints1atkBoost = value;
                OnPropertyChanged("s1atkBoost");
            }
        }

        public Int64 s1defBoost
        {
            get
            {
                return _ints1defBoost;
            }
            set
            {
                _ints1defBoost = value;
                OnPropertyChanged("s1defBoost");
            }
        }

        public Boolean conquered
        {
            get
            {
                return _fconquered;
            }
            set
            {
                _fconquered = value;
                OnPropertyChanged("conquered");
            }
        }

        public Int64 tileLevel
        {
            get
            {
                return _inttileLevel;
            }
            set
            {
                _inttileLevel = value;
                OnPropertyChanged("tileLevel");
            }
        }

        #region manual properties
        public String S0CityName
        {
            get
            {
                return _strS0CityName;
            }
            set
            {
                _strS0CityName = value;
                OnPropertyChanged("S0CityName");
            }
        }

        public String S1CityName
        {
            get
            {
                return _strS1CityName;
            }
            set
            {
                _strS1CityName = value;
                OnPropertyChanged("S1CityName");
            }
        }

        public String S0PlayerName
        {
            get
            {
                return _strS0PlayerName;
            }
            set
            {
                _strS0PlayerName = value;
                OnPropertyChanged("S0PlayerName");
            }
        }

        public String S1PlayerName
        {
            get
            {
                return _strS1PlayerName;
            }
            set
            {
                _strS1PlayerName = value;
                OnPropertyChanged("S1PlayerName");
            }
        }

        public String S0AllianceName
        {
            get
            {
                return _strS0AllianceName;
            }
            set
            {
                _strS0AllianceName = value;
                OnPropertyChanged("S0AllianceName");
            }
        }

        public String S1AllianceName
        {
            get
            {
                return _strS1AllianceName;
            }
            set
            {
                _strS1AllianceName = value;
                OnPropertyChanged("S1AllianceName");
            }
        }

        public String ReportDateTime
        {
            get
            {
                return _strReportDateTime;
            }
            set
            {
                _strReportDateTime = value;
                OnPropertyChanged("ReportDateTime");
            }
        }

        public String MarchTypeName
        {
            get
            {
                return _strMarchTypeName;
            }
            set
            {
                _strMarchTypeName = value;
                OnPropertyChanged("MarchTypeName");
            }
        }
        #endregion
        #endregion

        #region methods
        #endregion
        #endregion
    }
}

/* Property Generator Lines
reportType,Int64,false
reportId,Int64,false
reportUnixTime,Int64,false
side0XCoord,Int64,false
side0YCoord,Int64,false
side0TileType,Int64,false
side0TileLevel,Int64,false
side0CityId,Int64,false
side0PlayerId,Int64,false
side0AllianceId,Int64,false
side1XCoord,Int64,false
side1YCoord,Int64,false
side1CityId,Int64,false
side1PlayerId,Int64,false
side1AllianceId,Int64,false
marchType,Int64,false
marchTypeState,Int64,false
userId,Int64,false
eventType,Int64,false
subType,Int64,false
reportStatus,Int64,false
reportDetailId,Int64,false
s0Kid,Int64,false
s1Kid,Int64,false
s1KLv,Int64,false
s0KCombatLv,Int64,false
s1KCombatLv,Int64,false
rnds,Int64,false
winner,Int64,false
wall,Int64,false
s1atkBoost,Int64,false
s1defBoost,Int64,false
conquered,Boolean,false
tileLevel,Int64,false
 */
